package kkb.IOTest;

import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.io.PrintWriter;

public class IoStreamTtest {

    public static void main(String[] args) throws FileNotFoundException {

        //打印流  我们自己定义 打印的位置
//        PrintStream printStream = new PrintStream("D://printstream.txt");
//        printStream.print("打印流");

        PrintWriter printWriter =  new PrintWriter("D://printstream.txt");
        printWriter.write("PrintWriter 字符答应流");
        //字符写入  必须 刷新管道
        printWriter.flush();
        //关流
        printWriter.close();



    }
}
